def file_read(filename):
    with open(filename, 'r', encoding="utf-8") as f:
        print(f.read())
def file_write(filename,content):
    with open(filename, 'w', encoding="utf-8") as f:
        f.write(content)
        pass

def file_copy(filename, oldfile):
    with open(oldfile, 'r', encoding="utf-8") as f:
        with open(filename, 'w', encoding="utf-8") as f2:
            f2.write(f.read())

if __name__ == '__main__':
    file_write('../read2.txt', '这是一个写入文件，并且是从头开始写的用来测试文件复制')
    file_copy('../read3.txt', './read2.txt')